<?php

class Controller_Test_Tools extends Core_Controller_Web
{
    public $autoRender = false;

    public function jsminAction()
    {
        header('Content-type: text/javascript; charset=UTF-8');

        $js = '';
        foreach (array(
            'common.js',
            'lang/zh_cn.js',
            'fight.js',
            'iscroll-lite.js',
            'countdown.js',
            'php.js',
        ) as $jsPath) {
            $js .= file_get_contents(APP_PATH . 'Web/js/' . $jsPath);
        }

        file_put_contents(APP_PATH . 'Web/js/all_' . date('md'). '.js', Third_JSMin::minify($js));
    }

    public function methodsAction()
    {
        echo implode('|', get_class_methods($this));
    }
}